package com.foreknow.demo4;

public class Person {
    String name;
    int age;
    String school;

    public void sleep() {
        System.out.println(name + " sleep......");
    }

    public void eat() {
        System.out.println(name + " eat......");
    }

    public void study() {
        System.out.println(name + " study......");
    }

    public static void main(String[] args) {
        //创建对象
        Person person = new Person();
        //调用对象中的属性和方法
        person.name = "fender";
        person.age = 12;
        person.school = "foreknow";
        person.eat();
        person.sleep();
        person.study();

        Person person1 = new Person();
        person1.name = "gibson";
        person1.age = 13;
        person1.school = "neu";
        person1.eat();
        person1.sleep();
        person1.study();

    }
}
